﻿using System;
using System.Collections.Generic;
using System.Web;
using ORS.DAL;

namespace ORS.BLL
{
    public class TimeManage
    {
        private static string SQLCommand = "Update tb_paperinfo set reviewlimitdate =@Date where paperid =@Title";
        public static void UpdateLimitDate(string sTitle, DateTime Time)
        {
            
            string ConString = System.Configuration.ConfigurationManager.ConnectionStrings["DB_ConnectionString"].ConnectionString;
            System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection(ConString);
            System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand(SQLCommand, conn);
            command.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Title", sTitle));
            command.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Date", Time));
            try
            {
                conn.Open();
                command.ExecuteNonQuery();
            }
            catch (Exception d)
            {
                throw d;
            }
            finally
            {
                command = null;
                conn.Close();
                conn = null;
            }
        }
    }
}